#include<iostream>
#include<string>
#include<queue>
using namespace std;
const int N = 10;
int dx[8] = { -1,1,0,0,-1,-1,1,1 };
int dy[8] = { 0,0,1,-1,1,-1,1,-1 };
string st[8] = { "L","R","U","D","LU","LD","RU","RD" };
struct node
{
	int x, y;
	int step;
	string move[110];
};
int vis[N][N];
string s, e;
queue<node>q;
int main()
{
	cin >> s >> e;
	if (s == e) {
		cout << 0 << endl;
		return 0;
	}
	int a = s[0] - 'a' + 1;
	vis[a][s[1] - '0'] = 1;
	q.push({ a,s[1] - '0',0,"" });
	while (q.size()) {
		node t = q.front();
		q.pop();
		//cout << t.x << " " << t.y << endl;
		for (int i = 0; i < 8; i++) {
			int a = t.x + dx[i];
			int b = t.y + dy[i];
			if (a <= 0 || a > 8 || b <= 0 || b > 8 || vis[a][b])continue;
			//cout << "a==" << a << "  " << "b===" << b << endl;
			node temp = { a,b,t.step + 1};
			for (int j = 1; j <= t.step; j++) {
				temp.move[j] = t.move[j];
			}
			temp.move[temp.step] = st[i];
			vis[a][b] = 1;
			q.push(temp);
			if (a == e[0] - 'a' + 1 && b == e[1] - '0') {
				cout << temp.step << endl;
				for (int j = 1; j <= temp.step; j++) {
					cout << temp.move[j] << endl;
				}
				break;
			}
		}
	}
	return 0;
}